package lock;

/**
 * @author: feiwang_6
 * @create: 2020/5/17 8:14
 * @description:
 */
public class InstanceFactory {
    private static class InstanceHolder {
        public static Instance instance = new Instance();
    }
    public static Instance getInstance() {
        return InstanceHolder.instance ; // 这里将导致InstanceHolder类被初始化
    }
}